
	
/*
 * 自动计算表单数据
 */
function calFormItem() {
    var domForm = $('#' + window.formObj.c.id_form);
	var costPrice = parseFloat(domForm.find('input[name="costPrice"]').val()); // 成本价
	var quantity = parseFloat(domForm.find('input[name="quantity"]').val()); // 数量
	var proxyPrice = parseFloat(domForm.find('input[name="proxyPrice"]').val()); // 代理价

	if((costPrice || costPrice==0) && (quantity || quantity==0)){
		var totalPrice = costPrice*quantity;
		domForm.find('input[name="totalPrice"]').val(totalPrice.toFixed(2));
	}
	if((quantity || quantity==0) && (proxyPrice || proxyPrice==0)){
		var proxyTotalPrice = proxyPrice*quantity;
		domForm.find('input[name="proxyTotalPrice"]').val(proxyTotalPrice.toFixed(2));
	}

}